//
//  XGMArchiverTools.h
//  GNRuralI
//
//  Created by 小熊 on 2018/1/5.
//  Copyright © 2018年 小熊. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface XGMArchiverTools : NSObject
//第一步:封装一个归档反归档工具类

//归档的工具方法
+ (void)archiverObject:(id)object ByKey:(NSString *)key
              WithPath:(NSString *)path;
//解档
+ (id)unarchiverObjectByKey:(NSString *)key
                   WithPath:(NSString *)path;
//根据名字删除.plst文件
+ (void)removeItemAtPath:(NSString *)plistPath;

#pragma mark - NSUserDefault 缓存
/**
 *  NSUserDefault 缓存
 */
/**根据key存储对应的值*/
+ (void)cache:(id)dataInfo ForKey:(NSString *)key;
/**根据key取出对应的值*/
+ (id)cacheForKey:(NSString *)key;
/**根据key存对应的bool*/
+ (void)cacheBool:(BOOL)boo ForKey:(NSString *)key;
/**根据key取出对应的bool*/
+ (BOOL)cacheBoolForKey:(NSString *)key;
/**根据key清除缓存*/
+ (void)removeForKey:(NSString *)key;

@end
